Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global stream pool #13922

Merged
merged 146 commits into from
Sep 13, 2023
Merged

Global stream pool #13922

merged 146 commits into from
Sep 13, 2023

Conversation

etseidl
Copy link
Contributor

@etseidl etseidl commented Aug 18, 2023

Description

#13637 added a static stream pool object for use by the Parquet reader. This PR expands upon that by:

  • Moving the stream pool to the cudf::detail namespace.
  • Adding a debugging implementation that always returns the default stream.
  • Hiding implementation details behind a more streamlined interface.
  • Using cuda events for synchronization.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

etseidl and others added 30 commits June 26, 2023 15:54
* @param count The number of `cuda_stream_view` objects to return.
* @return Vector containing `count` stream views.
*/
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% sure, but can't think of a scenario where caller would not want to keep the streams.

Suggested change
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);
[[nodiscard]] std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, std::size_t count);

@PointKernel
Copy link
Member

/ok to test

@github-actions github-actions bot removed the conda label Sep 8, 2023
Copy link
Contributor

@vuule vuule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@bdice bdice removed the request for review from a team September 11, 2023 20:06
Copy link
Member

@harrism harrism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. Just one more missing const, I think.

* @param count The number of stream views to return.
* @return Vector containing `count` stream views.
*/
std::vector<rmm::cuda_stream_view> fork_streams(rmm::cuda_stream_view stream, uint32_t count);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately this will not be in the cudf namespace, but in rmm. I think there we should consider cudf::stream_view::fork(int num_streams) and cudf::stream_view::join(std::span<rmm::cuda_stream_view const> other_streams).

I'm OK with this for now.

cpp/include/cudf/detail/utilities/stream_pool.hpp Outdated Show resolved Hide resolved
@vuule
Copy link
Contributor

vuule commented Sep 12, 2023

/ok to test

@vuule vuule requested a review from harrism September 12, 2023 22:35
@harrism
Copy link
Member

harrism commented Sep 12, 2023

/merge

@vuule
Copy link
Contributor

vuule commented Sep 12, 2023

/ok to test

@rapids-bot rapids-bot bot merged commit 3be772f into rapidsai:branch-23.10 Sep 13, 2023
58 checks passed
@etseidl etseidl deleted the draft_stream_pool branch September 13, 2023 01:21
@bdice bdice mentioned this pull request Sep 21, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants